package com.sc.service.advert;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sc.dal.mapper.advert.AdvertMapper;
import com.sc.dal.model.ParamMap;
import com.sc.dal.model.advert.Advert;
import com.sc.dal.model.member.Member;
import com.sc.service.BaseServiceImpl;
/**
 * 轮播图管理业务层代码
 * <h1>类注释说明</h1> 
 * 
 * @author xujunbao 
 * @version AdvertService.java,v0.1 2017年4月14日 上午9:50:25 xujunbao Exp  
 *
 */
@Service
public class AdvertService extends BaseServiceImpl<Advert>{
	@Autowired
	private AdvertMapper advertMapper;
	
	
	public int deleteByPrimaryKey(Integer aid){
 		return advertMapper.deleteByPrimaryKey(aid);
 	}

	public int insert(Advert record){
		return advertMapper.insert(record);
	}

	public int insertSelective(Advert record){
		return advertMapper.insertSelective(record);
	}

	public Advert selectByPrimaryKey(Integer aid){
		return advertMapper.selectByPrimaryKey(aid);
	}

	public int updateByPrimaryKeySelective(Advert record){
		return advertMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(Advert record){
		return advertMapper.updateByPrimaryKey(record);
	}
	/**
	 * 分页查询轮播图数据
	 * <h2>方法注释说明</h2> 
	 * 
	 * @param paramMap
	 * @return
	 * @return List<Advert> 
	 * @throws
	 */
	public List<Advert> selectList(ParamMap paramMap) {
		// TODO Auto-generated method stub
		return advertMapper.selectList(paramMap);
	}
	/**
	 * @param type 
	 * 获取轮播图
	 * <h2>方法注释说明</h2> 
	 * 
	 * @param amount
	 * @return
	 * @return List<Advert> 
	 * @throws
	 */
	public List<Advert> getAdvertList(Integer amount, String type) {
		// TODO Auto-generated method stub
		return advertMapper.getAdvertList(amount,type);
	}
}
